package com.fwj.core.common.config;

import com.fwj.core.common.annotation.LoginUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import java.util.List;

/**
 * @Author: fwj
 * @Data: 2022/4/11 13:45
 * @Version 1.0
 * @Description:
 */

@Configuration
public class CommonParamHandleConfigure implements WebMvcConfigurer {

    @Autowired
    private LoginUser.LoginUserHandlerMethodArgumentResolver loginUserHandlerMethodArgumentResolver;

    @Override
    public void addArgumentResolvers(List<HandlerMethodArgumentResolver> resolvers) {
        resolvers.add(loginUserHandlerMethodArgumentResolver);
    }
}
